package com.hyt.it.ogt.kq.service.bm.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.hyt.core.httpclient.FormFieldKeyValuePair;
import com.hyt.it.ogt.kq.service.bm.model.entity.ProjectSubject;
import com.hyt.it.ogt.kq.service.bm.model.vo.SubjectStatVo;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 报名项目科目 服务类
 * </p>
 *
 * @author wangt
 * @since 2020-05-15
 */
public interface IProjectSubjectService extends IService<ProjectSubject> {

    Object update(ProjectSubject projectSubject) throws Exception;

    List<SubjectStatVo> statSubjectByProjectId(String projectId, List<String> permissionList, String subjectId, String deptId);

    void deleteSubject(String id, String projectId, String subjectId) throws Exception;

    void deleteSubjectByProjectId(String projectId);

    List<Map<String, String>> getSubjectList(String enrollId, String subjectId);

    List<Map<String, Object>> getProjectCollectInfos(String enrollId, String subjectId, List<String> candidateIds, Boolean isAll, String kwFlag);

    List<Map<String, Object>> queryAllStudent(String columns, String projectId, String studentId, String isPay, String isAudit);

    List<Map<String, Object>> queryStudentById(String columns, String projectId, String studentId);

    void recordSuccessCandidates(String enrollId, String subjectId, List<String> studentIds);

    void updateProject(ProjectSubject projectSubject);

    ProjectSubject querySubject(String id);

    void updateSubject(String projectId, String subjectId);

    List<ProjectSubject> querySubjectList(String projectId, String subjectName);

    ProjectSubject querySubjectByName(String projectId, String subjectName);

    ProjectSubject queryBySubjectId(String projectId, String subjectId);
    
    ProjectSubject queryBySubjectId(String subjectId);

    String getSqlColumn(String projectId);

    List<Map<String, Object>> queryAllStudent(String columns, String projectId, String studentId, String isPay, String isAudit, int pageNo, int pageSize);

    /***
     * 获取当前科目报考的人数
     * @param id
     * @param subjectId
     * @return
     */
    Integer getCurrentRegSubjectCount(String projectId, String subjectId);

    /***
     * 根据项目id查询科目列表
     * @param projectId
     * @return
     */
    List<ProjectSubject> getProjectSubjectsByProjectId(String projectId);

    /**
     * 获取报名的科目列表
     *
     * @param projectId
     * @return
     */
    List<FormFieldKeyValuePair> selectSubject(String projectId);
}
